<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>IT服务知识库</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css" />
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/it/common/css/style.css" />
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <style>
        .itMain ul {
            height: auto;
            overflow-y: auto;
        }
        .mt04 {
            margin-top: 4px;
        }
    </style>
</head>

<body style="overflow-y: auto;">
<div class="container clearfix" style="margin-left:3%;width:95%;">
    <!--占位-->
    <div class="headerHightAdd" style="height:50px">
        <div  style="color: red;margin-top: 35px;margin-left: 80px">声明：知识库成果供我司员工使用，未经允许，禁止外传，如有违反，责任自负。如有侵权，请及时联系我们删除。</div>
    </div>
    <div class="itMain clearfix">
        <div class="fl whitebg">
            <div class="itMainTitle clearfix">
                <img src="${re.contextPath}/plugin/common/images/85@2x.png" class="fl">
                <span class="ft20 blue fl mt04">最新</span>
            </div>
            <ul>
                <#list newfile as new>
                    <a href="#" <#if '${details}'=='1'>onclick="newclick(this)"</#if>  newName="${new.fileName}" newId="${new.id}">
                        <li>${new.fileName}</li>
                    </a>
                </#list>
            </ul>
        </div>
        <div class="fl whitebg">
            <div class="itMainTitle clearfix">
                <img src="${re.contextPath}/plugin/common/images/84@2x.png" class="fl">
                <span class="ft20 red fl mt05">最热</span>
            </div>
            <ul>
                <#list hotFile as hot>
                    <a href="#"  <#if '${details}'=='1'>onclick="hotlick(this)"</#if> hotName="${hot.fileName}" hotId="${hot.id}">
                        <li>${hot.fileName}</li>
                    </a>
                </#list>
            </ul>
        </div>
        <div class="fl whitebg" style="overflow-y: auto">
            <div class="itMainTitle clearfix">
                <img src="${re.contextPath}/plugin/common/images/83@2x.png" class="fl">
                <span class="ft20 green fl mt05">收藏夹</span>
            </div>
            <ul>
                <#list collectFile as collect>
                    <a href="#"  <#if '${details}'=='1'>onclick="collectlick(this)"</#if> collectName="${collect.fileName}" collectId="${collect.id}">
                        <li>${collect.fileName}</li>
                    </a>
                </#list>
            </ul>
        </div>
    </div>
</div>
<!--JQ-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery-1.8.3.min.js"></script>
<!--公用样式JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
<!--选择城市js-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/area.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/select.js"></script>
<!--进度条-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/progress.js"></script>
<!--分页-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.page.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"></script>
<script type="text/javascript" charset="utf-8" src="/plugin/it/common/js/itkl.js"></script>
<script>
    //最新文件
    function newclick(e){
        $('.mt50').toggle();
        var id=$(e).attr('newId');
        var name=$(e).attr('newName');
        //增加浏览量:
        _itkl.file.addViewCount(id);
        window.parent._showtab(id,name,"/it/file/particulars?id="+id,function(iframe){
            if(iframe){
                $(iframe)[0].contentWindow.flushPage();
            }
        });
    }
    //最热门文件
    function hotlick(e){
        $('.mt50').toggle();
        var id=$(e).attr('hotId');
        var name=$(e).attr('hotName');
        //增加浏览量:
        _itkl.file.addViewCount(id);
        window.parent._showtab(id,name,"/it/file/particulars?id="+id,function(iframe){
            if(iframe){
                $(iframe)[0].contentWindow.flushPage();
            }
        });
    }
    //收藏夹文件
    function collectlick(e){
        $('.mt50').toggle();
        var id=$(e).attr('collectId');
        var name=$(e).attr('collectName');
        //增加浏览量:
        _itkl.file.addViewCount(id);
        window.parent._showtab(id,name,"/it/file/particulars?id="+id,function(iframe){
            //点开首页的话,刷新最新,最热,和收藏夹:
            if(iframe){
                $(iframe)[0].contentWindow.flushPage();
            }
        });
    }
    $(function(){
        $(document).parents('iframe').attr('scrolling','no');
    })

    function flushPage(){
        location.reload();
    }
</script>
</body>

</html>
